/**
 * Copyright &copy; 2012-2016 <a href="https://www.kaaction.com">KAA</a> All rights reserved All rights reserved.
 */
package com.kaaction.modules.crab.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.kaaction.common.persistence.DataEntity;
import com.kaaction.common.utils.excel.annotation.ExcelField;

/**
 * 客户管理Entity
 * @author huanghaiming
 * @version 2017-07-18
 */
public class CustomerManage extends DataEntity<CustomerManage> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 姓名
	private String mobile;		// 手机号
	private String address;		// 地址
	private Date buyDate;		// 购买时间
	private String buyProduct;		// 购买商品
	private Integer num;		// 购买数量
	private Double price;		// 购买价格
	private String remarks;	// 备注
	
	public CustomerManage() {
		super();
	}

	public CustomerManage(String id){
		super(id);
	}

	@Length(min=1, max=32, message="姓名长度必须介于 1 和 32 之间")
	@ExcelField(title="姓名", align=2, sort=1)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=1, max=16, message="手机号长度必须介于 1 和 16 之间")
	@ExcelField(title="手机号", align=2, sort=4)
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	@Length(min=0, max=128, message="地址长度必须介于 0 和 128 之间")
	@ExcelField(title="地址", align=2, sort=7)
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="购买时间", align=2, sort=10)
	public Date getBuyDate() {
		return buyDate;
	}

	public void setBuyDate(Date buyDate) {
		this.buyDate = buyDate;
	}
	
	@Length(min=0, max=32, message="购买商品长度必须介于 0 和 32 之间")
	@ExcelField(title="购买商品", align=2, sort=13)
	public String getBuyProduct() {
		return buyProduct;
	}

	public void setBuyProduct(String buyProduct) {
		this.buyProduct = buyProduct;
	}
	
	@ExcelField(title="购买数量", align=2, sort=17)
	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}
	
	@ExcelField(title="购买价格", align=2, sort=20)
	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	@Length(min=0, max=255, message="购买商品长度必须介于 0 和 32 之间")
	@ExcelField(title="备注", align=2, sort=23)
	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	
	
	
}